package com.ruoyi.test.mapper;
import com.ruoyi.test.domain.InterfaceManagement;
import com.ruoyi.test.domain.ParamEdit;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

public interface ParamEditMapper {
    /**
     * 查询接口管理
     *
     * @param id 接口管理主键
     * @return 接口管理
     */
    @Select(" SELECT COUNT(*) as count FROM information_schema.TABLES WHERE table_name =  concat('interface', #{id})")
    public int selectTableExist(@Param("id") Long id);
    @Select("select column_name as paramName,column_type as type from information_schema.COLUMNS where TABLE_NAME= concat('interface', #{id})")
    public List<ParamEdit> selectTableParam(@Param("id") Long id);


    public List<Object> selectDataList(@Param("tableName") String tableName);


    public int createTable(@Param("tableName") String tableName);


    /**
     * 新增
     */
    public int insertParam(ParamEdit paramEdit);

    /**
     * 修改
     */
    public int updateParam(ParamEdit paramEdit);


    public int deleteParam(ParamEdit paramEdit);

    public int insertMap(@Param("map")Map map);

    public int deleteTable(@Param("tableName") String tableName);

}
